#!/bin/bash

source src/conf/config.conf

cd $tftp_dir
echo " Downloading ESXI ..."
wget -q -c  logos/esx.tar.gz

#wget -c  http://pxe.sytes.net/esx.tar.gz


tar -xzvf esx.tar.gz -C esx/

mkdir -p tars
mv esx.tar.gz tars/


## ESX -  MENU


cat >> pxelinux.cfg/hypervisors << EOF
default vesamenu.c32
prompt 0 
menu title Hypervisor Installer
timeout 30
menu include pxelinux.cfg/graphics.conf
MENU BACKGROUND pxelinux.cfg/background.png

label VMWARE ESXi VMvisor
    menu label VMWARE ThinESXi Installer
    kernel mboot.c32
    append esx/vmkernel.gz ks=http://pxe.sytes.net/answerfiles/kickstart/esxi-ks.cfg  --- esx/binmod.tgz --- esx/ienviron.tgz --- esx/cim.tgz --- esx/oem.tgz --- esx/license.tgz --- esx/install.tgz

	 TEXT HELP
       Install  VMWARE ThinESXi VM Hypervisor 
         ENDTEXT
EOF


